home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-07-28 | 3.8 KB | 175 lines | [TEXT/MPS ] |
- /*
- File: StaticRecipient.cp
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- /***********************************|****************************************/
-
- #ifndef __BLJSTANDARDINCLUDES__
- #include "BLJStandardIncludes.h"
- #endif
-
- #ifndef __STATICRECIPIENT__
- #include "StaticRecipient.h"
- #endif
-
- #ifndef __UTILITIES__
- #include "Utilities.h"
- #endif
-
- #pragma segment StaticRecipient
-
- /***********************************|****************************************/
-
- TStaticRecipient::TStaticRecipient ( const TRString& name, RecipientTypeSet type, RecipientStatusSet status, OSType addressType, const void* data, unsigned long length ):
- TRecipient (),
- fName ( name ),
- fType ( type ),
- fStatus ( status ),
- fAddressType ( addressType ),
- fData ( nil ),
- fLength ( 0 )
- {
- if ( data && length )
- { fData = new char [ length ];
- if ( fData )
- fLength = length;
- }
- }
-
- /***********************************|****************************************/
-
- TStaticRecipient::TStaticRecipient ( const TRecipient* copied ):
- TRecipient (),
- fName (),
- fData ( nil ),
- fLength ( 0 )
- {
- copied->GetRecipientName ( fName );
- copied->GetRecipientType ( fType );
-
- fStatus = copied->GetStatus ();
-
- copied->GetCID ( fID );
- }
-
- /***********************************|****************************************/
-
- TStaticRecipient::~TStaticRecipient ()
- {
- delete fData;
- }
-
- /***********************************|****************************************/
-
- Boolean
- TStaticRecipient::GetResponsible () const
- {
- return false;
- }
-
- /***********************************|****************************************/
-
- Boolean
- TStaticRecipient::GetRecipientName ( TRString& name ) const
- {
- name = fName;
- return true;
- }
-
- /***********************************|****************************************/
-
- Boolean
- TStaticRecipient::GetRecipientType ( TRString& type ) const
- {
- type = fType;
- return true;
- }
-
- /***********************************|****************************************/
-
- Boolean
- TStaticRecipient::GetDirectoryName ( DirectoryName& ) const
- {
- return false;
- }
-
- /***********************************|****************************************/
-
- Boolean
- TStaticRecipient::SetStatus ( RecipientStatusSet status )
- {
- fStatus = status;
- return true;
- }
-
- /***********************************|****************************************/
-
- RecipientStatusSet
- TStaticRecipient::GetStatus () const
- {
- return fStatus;
- }
-
- /***********************************|****************************************/
-
- unsigned long TStaticRecipient::GetExtensionDataSize(void)const
- {
- return 0;
- }
-
- /***********************************|****************************************/
-
- OSType
- TStaticRecipient::GetAddressType ( void ) const
- {
- return fAddressType;
- }
-
- /***********************************|****************************************/
-
- void
- TStaticRecipient::GetExtensionData ( unsigned long offset, void * buffer, unsigned long bufferSize) const
- {
- unused(offset); unused(buffer); unused(bufferSize);
- }
-
- /***********************************|****************************************/
-
- unsigned short TStaticRecipient::GetPathNameCount() const
- {
- return 0;
- }
-
- /***********************************|****************************************/
-
- void TStaticRecipient::GetPathNameItem(unsigned short, TRString& ) const
- {
- // This should really do something.
- }
-
- /***********************************|****************************************/
-
- Boolean TStaticRecipient::GetPathDNode(unsigned long&)const
- {
- // This should really do something.
- return 0;
- }
-
- /***********************************|****************************************/
-
- Boolean TStaticRecipient::GetCID(CreationID& cid) const
- {
- return false;
- }
-
- /***********************************|****************************************/
-